home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / progs / editor / frexxed / fpl / killnotify.fpl < prev    next >
Text File  |  1995-07-18  |  613b  |  20 lines

  1. int export KilledNotify_hook(int ID)
  2. {
  3.   int countdown = ReadInfo("_iconify_when_quit_countdown", ID);
  4.   string port = ReadInfo("_notifyport", ID);
  5.   if(strlen(port)) {
  6.     ARexxSend(port, "!");
  7.   }
  8.   if (countdown > 0 && ReadInfo("_iconify_when_quit",ID)) {
  9.     SetInfo(ID, "_iconify_when_quit_countdown", countdown-1);
  10.     if (countdown == 1) {
  11.       Iconify();
  12.     }
  13.   }
  14. }
  15.  
  16. ConstructInfo("_notifyport", "", "", "HLS", "", 0, 0);
  17. ConstructInfo("_iconify_when_quit", "", "", "HLB", "", 0, 0);
  18. ConstructInfo("_iconify_when_quit_countdown", "", "", "HGI", "", 0, 9999, 0);
  19. Hook("BufferKill", "KilledNotify_hook");
  20.